<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<!-- All Spring messages used in this view are declared below with a variable -->
<spring:message code="menu.destination_lbl" var="destination_lbl"/>
<spring:message code="menu.predefined_lbl" var="predefined_lbl"/>
<spring:message code="menu.login_lbl" var="login_lbl"/>
<spring:message code="menu.myprofile_lbl" var="myprofile_lbl"/>
<spring:message code="menu.mybookings_lbl" var="mybookings_lbl"/>
<spring:message code="menu.logout_lbl" var="logout_lbl"/>

<nav id="menu-nav" class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <div class="pull-left">
            <img src="<c:url value="/img/Reisburrito.png"/>" class="reisburritologo_menu"/>
        </div>
        
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="${currentMenuTab == 'index' ? 'active' : ''}"><a href="<c:url value="/index"/>">Home</a></li>
                <li class="${currentMenuTab == 'trip' ? 'active' : ''}"><a href="<c:url value="/trip/index"/>">${predefined_lbl}</a></li>
                    <sec:authorize access="!hasRole('klant')">
                    <li class="${currentMenuTab == 'login' ? 'active' : ''}"><a href="<c:url value="/loginPage"/>">${login_lbl}</a></li>
                    </sec:authorize>
                    <sec:authorize access="hasRole('klant')">
                        <sec:authorize access="!hasRole('admin')">
                    <li class="${currentMenuTab == 'customer' ? 'active' : ''}"><a href="<c:url value="/customer/edit"/>">${myprofile_lbl}</a></li>
                    <li class="${currentMenuTab == 'tripbooking' ? 'active' : ''}"><a href="<c:url value="/tripbooking"/>">${mybookings_lbl}</a></li>
                    </sec:authorize>
                    <li class="${currentMenuTab == 'logout' ? 'active' : ''}"><a href="<c:url value="/logout"/>">${logout_lbl}</a></li>
                    </sec:authorize>
            </ul>
        </div>

    </div>
</nav>
